import { NgModule } from "@angular/core";
import { RouterModule } from "@angular/router";
import { MaterialIntoComponent } from "@app/material/into/into.component";
import { MaterialLocationComponent } from "./location/location.component";
import { MaterialIndexComponent } from "./index/index.component";
import { MaterialLogComponent } from "./log/log.component";
import { CostsComponent } from "./cost/cost.component";

@NgModule({
  imports: [
    RouterModule.forChild([
      {
        path: "",
        children: [
          {
            path: "manage",
            component: MaterialIndexComponent,
            data: { permission: "Pages.Material.Manage" }
          },
          {
            path: "location",
            component: MaterialLocationComponent,
            data: { permission: "Pages.Material.Location" }
          },
          {
            path: "into",
            component: MaterialIntoComponent,
            data: { permission: "Pages.Material.Into" }
          },
          {
            path: "log",
            component: MaterialLogComponent,
            data: { permission: "Pages.Material" }
          },
          {
            path: "cost",
            component: CostsComponent,
            data: { permission: "Pages.Material" }
          }
        ]
      }
    ])
  ],
  exports: [RouterModule]
})
export class MaterialRoutingModule {}
